package com.qianya.system.face.web.patient.faceutil.dto;


import com.arcsoft.face.Rect;
import com.qianya.system.face.web.patient.model.PatientFileInfo;
import com.qianya.system.face.web.patient.model.PatientHisPrescription;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

@Data
@ApiModel(value="FaceRecognitionResDTO对象", description="服药日志表")
public class FaceRecognitionResDTO implements Comparable<FaceRecognitionResDTO>{

    @ApiModelProperty(value = "人脸定位")
    private Rect rect;
    @ApiModelProperty(value = "人脸信息")
    private PatientFileInfo fileInfo;
    @ApiModelProperty(value = "医嘱信息")
    private List<PatientHisPrescription> hisPrescription;
    @ApiModelProperty(value = "相识度")
    private float similar;

    @Override
    public int compareTo(FaceRecognitionResDTO faceRecognitionResDTO) {
        int a = this.getRect().getRight()-this.getRect().getLeft();
        int b = faceRecognitionResDTO.getRect().getRight()-faceRecognitionResDTO.getRect().getLeft();
        return b-a;
    }
}
